from tkinter import *

root = Tk()
root.geometry('500x300+100+200')
l1 = Label(root,width=10,height=2,fg='red',bg='yellow',text='he',justify='center',font=('黑体', 10),anchor='ne')
l1.pack()

# 显示图像
# global photo 
photo = PhotoImage(file=r'e:\tkinterstuden\1.gif')
l2 = Label(root,width=50,height=30,image=photo,anchor='ne')
l2.pack()

l3 = Label(root,width=10,height=2,fg='red',bg='black',text='sorry',justify='center',font=('黑体', 10),borderwidth=3,relief='solid')
l3.pack()

root.mainloop()